<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet"  type="text/css"  href="/lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet"  type="text/css" href="/css/goodslist.css">
    <style>
        thead tr{
            background-color: rgba(102,102,102,1);
            color: #fff;
        }
        table{
            background: #FFFFFF;
            border: 1px solid #CCCCCC;
            border-radius: 2px;
        }
        tbody tr:nth-child(odd){
            background-color: #FAFAFA;
        }
        input[type=checkbox]{
            width: 14px;
            height: 14px;

        }
    </style>
</head>
<body>
<div class="goodslist-wrapper" style="padding: 0 30px 0 30px">

    <div>
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation"><a href="{:url('goods/index')}" >所有商品 <i>({$list['shop_count']})</i></a></li>
            <!-- <li role="presentation"><a href="#commonGoods" >普通商品 <i>(0)</i></a></li>
            <li role="presentation"><a href="#virtualGoods">虚拟商品 <i>(0)</i></a></li> -->
            <li role="presentation"><a href="{:url('goods/shop_audit')}" >审核商品<i>({$list['shop_audit']})</i></a></li>
            <li role="presentation"><a href="{:url('goods/shop_use')}" >上架商品<i>({$list['shop_use']})</i></a></li>
            <li role="presentation" class="active"><a href="{:url('goods/shop_no_use')}" >下架商品<i>({$list['shop_no_use']})</i></a></li>

            <li role="presentation"><a href="{:url('goods/shop_new')}" >精心推荐<i>({$list['shop_new']})</i></a></li>

            <li role="presentation" ><a href="{:url('goods/shop_pref')}" >优选商品<i>({$list['shop_pref']})</i></a></li>
            <li role="presentation"><a href="{:url('goods/shop_hot')}" >热销商品<i>({$list['shop_hot']})</i></a></li>
            <li role="presentation"><a href="{:url('goods/shop_delete')}" >商品回收站<i>({$list['shop_delete']})</i></a></li>
        </ul>
        <div class="row " style="padding: 20px 0 10px 0">
            <div class="col-sm-12">
                <a href="{:url('goods/insert')}" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span>添加商品</a>
<!--
                <a href="javascript:;" class="btn btn-default disabled"  id="del"><span class="glyphicon glyphicon-trash "></span>删除</a>
-->
                <form class=" form-inline " style="display: inline-block">
                    <input type="text"  class="form-control search" style="width: 250px;display: inline-block" placeholder="商品名称" name="search"><button class="btn btn-default" id="submit" type="submit"><span class="glyphicon glyphicon-search"></span></button>
                </form>
                <a
                        href="javascript:window.location.reload()"  class="btn btn-default" style="margin-left: 20px"><span class="glyphicon glyphicon-repeat"></span> 刷新-共 <i>({$list['shop_no_use']})</i>条记录</a>
            </div>
        </div>
        <div class="tab-content" style="margin-top: 20px">
            <table class="table "style="text-align: center">
                <thead style="border: 1px solid #BBBBBB;background-color:#eeeeee;" >
                <tr style="border-bottom: 1px solid #BBBBBB">
                    <!--<td>&lt;!&ndash;<input type="checkbox" id="check-all" onclick="checkAll()">&ndash;&gt;编号</td>-->
                    <td>商品名称</td>
                    <td>商家名称</td>
                    <td>价格/货号/运费</td>
                    <td>上架时间</td>
                    <td>区块展示</td>
                    <td>库存（件）</td>
                    <td>审核状态</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody style="border: 1px solid #BBBBBB">{volist name ='result' id = 'value'}
                <tr>

                    <!--<td>-->
                     <!--&lt;!&ndash;   <input type="checkbox">&ndash;&gt;-->
                        <!--<span>{$value.id}</span>-->
                    <!--</td>-->
                    <td>
                        <img src="{$value.image_path}" style="display: block;width: 50px;height: 50px;margin: 0 auto" >
                        <p class="good-name" style="width: 150px;margin: auto">{$value.shop_name}</p>
                    </td>
                    <td>商家名称</td>
                    <td class="huohao">
                        <div >价格：¥ <span class="good-price">{$value.shop_end_money}</span></div>
                        <div >运费：¥ <span class="good-price">{$value.freight}</span></div>
                    </td>
                    <td>
                        {if condition="empty($value.is_use_time)"}
                        <span class="text-danger">未上架</span>
                        {else /}
                        {$value.is_use_time|date="Y-m-d h:i:s",###}
                        {/if}
                    </td>
                    <td>
                        {if condition="$value.audit eq '0' AND $value.is_new eq '0'"}
                        <p><a href="javascript:;"  disabled class="btn btn-default btn-xs">精品推荐</a></p>
                        {elseif condition="$value.audit eq '1' AND $value.is_new eq '0'"}
                        <p><a href="javascript:;" disabled class="btn btn-default btn-xs">精品推荐</a></p>
                        {elseif condition="$value.audit eq '1' AND $value.is_new eq '1'"}
                        <p><a href="javascript:;" disabled class="btn btn-success btn-xs">取消推荐</a></p>
                        {/if}

                        {if condition="$value.preferred eq '0' AND $value.audit eq '0'"}
                        <p><a href="javascript:;"  disabled class="btn btn-default btn-xs">好货优选</a></p>
                        {elseif condition="$value.preferred eq '0' AND $value.audit eq '1'"}
                        <p><a href="javascript:;" disabled class="btn btn-default btn-xs">好货优选</a></p>
                        {elseif condition="$value.preferred eq '1' AND $value.audit eq '1'"}
                        <p><a href="javascript:;" disabled class="btn btn-success btn-xs">已优选</a></p>
                        {/if}

                        {if condition="$value.is_heat eq '0' AND $value.audit eq '0'"}
                        <p><a href="javascript:;"  disabled class="btn btn-default btn-xs">热销商品</a></p>
                        {elseif condition="$value.is_heat eq '0' AND $value.audit eq '1'"}
                        <p><a href="javascript:;" disabled class="btn btn-default btn-xs">热销商品</a></p>
                        {elseif condition="$value.is_heat eq '1' AND $value.audit eq '1'"}
                        <p><a href="javascript:;" disabled class="btn btn-success btn-xs">取消热销</a></p>
                        {/if}

                        {if condition="$value.is_use eq '0' AND $value.audit eq '1'"}
                        <p><a href="{:url('goods/isUse', ['is_use' => 1, 'id' => $value.id])}" class="btn btn-success btn-xs">已上架</a></p>
                        {elseif condition="$value.is_use eq '1'"}
                        <p><a href="{:url('goods/isUse', ['is_use' => 0, 'id' => $value.id])}" class="btn btn-default btn-xs">已下架</a></p>
                        {elseif condition="$value.is_use eq '2'"}
                        <p><a href="javascript:;" disabled class="btn btn-default btn-xs">上架</a></p>
                        {/if}
                    </td>
                    <td>
                        <p>{$value.stock_num}</p>
                    </td>
                    <td class="tongguo">
                        {if $value.audit == '0'}
                        <span class="text-danger">审核中</span>
                        {else}
                        <span class="text-success">审核通过</span>
                        {/if}
                    </td>
                    <td>
                        <ul>
                            <li><a href="javascript:;" disabled class="btn btn-default btn-xs">编辑</a></li>
                            <li>
                                {if $value.audit == '0'}
                                <a href="{:url('admin/goods/audit',['id'=>$value.id,'audit'=>1])}" class="btn btn-default btn-xs">审核</a>
                                {else}
                                <a href="javascript:;" class="btn btn-default btn-xs">已审核</a>
                                {/if}
                            </li>
                            <li>
                                {if $value.shop_delete == '0'}
                                <a href="{:url('goods/delete', ['shop_delete' => 1, 'id' => $value.id])}" class="btn btn-default btn-xs">删除</a>
                                {else}
                                <a href="{:url('goods/delete', ['shop_delete' => 0, 'id' => $value.id])}" class="btn btn-danger btn-xs">恢复</a>
                                {/if}
                            </li>
                        </ul>
                    </td>

                </tr>{/volist}
                </tbody>
            </table>
            <nav>
                {$page}
            </nav>

        </div>
    </div>
</div>
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="/js/goodslist.js"></script>
<script src="/js/nosearch.js"></script>
</body>
</html>